function [vL,vR]=RFNN_EKF_cal_v3(xd,yd,dg,sig,x,y,car_angle,do,sio,xo,yo,dgo,doo,sigo,sioo)
    aph=0.3;
%     b=0.098;
    b=0.2;
    S=[dg,do,sig,sio];
     % 初始化静态变量
    persistent a;
    if isempty(a)
%             a=[0.11,0.14,0.17,0.62,0.57,0.05,0.93,0.73,0.74,0.06,0.86,0.93,0.98,0.86,0.79,0.51;
%                 0.18,0.40,0.13,0.03,0.94,0.30,0.30,0.33,0.47,0.65,0.03,0.84,0.56,0.85,0.35,0.45];
            a=[0.44,0.63,0.21,0.64,0.97,0.70,0.88,0.93,0.95,0.52,0.18,0.82,0.05,0.13,0.93,0.28;
                0.94,0.68,0.67,0.38,0.87,0.56,0.30,0.85,0.78,0.97,0.98,0.60,0.01,0.26,0.31,0.23];
%         a=[-0.013,-0.035,0.069,-0.298,-0.2,0.438,0.163,-0.206,0.142,-0.07,0.442,0.235,0.538,-0.396,0.75,0.128;
%             -0.561,0.247,-0.033,0.499,-0.258,0.329,0.131,0.24,-0.343,0.138,-0.994,0.404,0.104,0.308,-0.523,0.14];
    end
    persistent k pre_x pre_y pre_xo pre_yo pre_car_angle vLp vRp;
    if isempty(k)
        k=0;
        pre_x=0;
        pre_y=0;
        pre_xo=0;
        pre_yo=0;
        pre_car_angle=0;
        vLp=0;
        vRp=0;
    end
    %神经网络部分计算输出
    W=a*sum(S(:));
    [Outputs,Fnk]=RFNNpro_v(S,W);
    vR=Outputs(1)/(1+aph*abs(Outputs(1)));
    vL=Outputs(2)/(1+aph*abs(Outputs(2)));
    S_pre=sum(S(:));
    Fnk_pre=Fnk;
    Outputs_pre=Outputs;
    if(k~=0)
        v=(vL+vR)/2;
        w=(vR-vL)/(2*b);
        vp=(vLp+vRp)/2;
        wp=(vRp-vLp)/(2*b);
        pre_po=[pre_x;pre_y;pre_car_angle]+0.1*[cos(pre_car_angle),0;sin(pre_car_angle),0;0,1]*[vp;wp];%算出k时刻的左右速度后预测的位置
%         %预测dg
%         Ldg_pre=[xd,yd]-[pre_po(1),pre_po(2)];
%         pre_dg=norm(Ldg_pre);
%         %预测sig
%         cos_sigP=dot(Ldg_pre,[1,0])/(pre_dg*1);
%         if(Ldg_pre(2)<0)
%             sigP=-acos(cos_sigP);
%         else
%             sigP=acos(cos_sigP);
%         end
%         pre_sig=sigP-pre_po(3);
        pre_dg=dg;
        pre_sig=sig;
%         %预测do
%         if(do<4)
% %             Ldo_pre=[pre_xo,pre_yo]-[pre_po(1),pre_po(2)];
%             Ldo_pre=[pre_xo,pre_yo]-[x,y];            
%             pre_do=norm(Ldo_pre);
%         else
%             pre_do=4;
%         end
%         
%         %预测sio
%         if(do<4)
%             cos_sioP=dot(Ldo_pre,[1,0])/(pre_do*1);
%             if(Ldo_pre(2)<0)
%                 sioP=-acos(cos_sioP);
%             else
%                 sioP=acos(cos_sioP);
%             end
%             pre_sio=sioP-pre_po(3);
%         else
%             pre_sio=0;
%         end
        pre_do=do;
        pre_sio=sio;
        %
        aIN=[a(1,:),a(2,:)];
        [dg_a,do_a,sig_a,sio_a]=jac_obt(aIN,Fnk_pre,S_pre,Outputs_pre,aph,b,car_angle,xd,yd,x,y,v,w,xo,yo);
        aOUT=EKF_v4(dg_a,do_a,sig_a,sio_a,dgo,doo,sigo,sioo,aIN,pre_dg,pre_do,pre_sig,pre_sio);
        a=aOUT;
    end
    k=k+1;
    pre_x=x;
    pre_y=y;
    pre_xo=xo;
    pre_yo=yo;
    pre_car_angle=car_angle;
    vLp=vL;
    vRp=vR;
end